$(function(){
    var  key=new URLSearchParams(location.search).get('key')
    console.log(key,4444);

    $.ajax({
        url:'/posts/search/'+key,
        success:function(res){
            console.log(res,2222);
            
        }
    })
    
})